/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package app.controller;

import app.business.GradeSessionBean;
import app.entity.Grades;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author DangThanh
 */
@ManagedBean(name = "gradeManagedBean")
@SessionScoped
public class GradeManagedBean {

    @EJB
    private GradeSessionBean gradeSessionBean;
    private Grades grade;

    public Grades getGrade() {
        return grade;
    }

    public void setGrade(Grades grade) {
        this.grade = grade;
    }

    /**
     * Creates a new instance of GradeManagedBean
     */
    public GradeManagedBean() {
        grade = new Grades();
    }

    public List<Grades> getGrades() {
        return gradeSessionBean.getAllGrades();
    }
}
